

<div class="artCon" style="padding:10px;">
	<div class="middleArt">
	<div class="form-horizontal">
		<div class="artMain">
			<div class="mainCenter">
					<form class="form-horizontal" id="selectForm" data-toggle="ajax-noclose-form" data-target="#tablelist_div" action="/${orgi}/dm/database/${databaseid!''}/${dirid!''}/selecttable.html" method="post">
					<fieldset class="control-group">
						<label class="control-label" for="name">数据表名查询：</label>
						<div class="controls">
							<input  class="span5" id ="tablename" maxlength="255"
								 name="tablename" value ="" type="text"> <span
								class="help-inline"></span><span class="btnWrap" style="margin-top:0px;">
								&nbsp;&nbsp;<input type="submit" class="subButtonStyle" value="查询"> </span>
								<!-- data-toggle="load"  href="/${orgi}/dm/database/${databaseid!''}/${dirid!''}/selecttable.html?tablename=" -->
								
						</div>
					</fieldset>
					</form>
					<form class="form-horizontal" id="tableAddForm"  name="tableAddForm" data-toggle="form" action="/${orgi}/dm/database/${databaseid!''}/${dirid!''}/tableaddo.html" method="post">
					<div id = "tablescheck">
					<fieldset class="control-group">
						<label class="control-label" for="name">数据表名：</label>
						<div id="tablelist_div" class="controls">
							<#include "tablelist.html"/>
						</div>
					</fieldset>
					</div>
					</form>
			</div>
		</div>
		<div class="mainCenter">
		</div>
		<div class="bottomBg">
			<div class="btnWrap">
				<input type="button" onclick="checkisNull()" class="subButtonStyle" value="确认"/>
				<input type="button" onclick="closeR3ArtDialog()" class="cancelButtonStyle" value="取消"/>
			</div>
		</div>
	</div>
	</div>
</div>
<script type="text/javascript">

	$(function(){
		$(".mainCenter ul li").hover(function(){
			$(this).addClass("cur").siblings("li").removeClass("cur");
		},function(){
			$(this).removeClass("cur");	
		});
	})
	
	function checkisNull(){
		var gettable = $("#tables").val();
		if (null == gettable){
			alertMsg("请先选择要导入的表!");
		} else {
			$("#tableAddForm").submit();
		}
   }
   function reLoadTable(val) {
    	    var tabName = $("#tablename").val()
    	    alert(tabName);
			loadURL(val+tabName,$("#tablescheck"),'',null,null);
			}
			
	function doTableMsg(divid,data){
		closeR3ArtDialog();
		alertMsg(data);
	}
</script>
